import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter);

import app from './App.vue'
import router from './router.js'
import './lib/mui/css/mui.min.css'
import './lib/mui/css/icons-extra.css'
import moment from 'moment'
//配置axios
import axios from 'axios'; //导入axios
axios.defaults.baseURL = 'http://localhost:3000/users';  //配置根域名
Vue.prototype.$ajax = axios;  //把axios挂载到Vue的原型上


// import {Header,Swipe, SwipeItem,Toast,Loadmore,Button,Lazyload} from 'mint-ui'
// Vue.component(Loadmore.name, Loadmore);
// Vue.component(Header.name, Header);
// Vue.component(Swipe.name, Swipe);
// Vue.component(SwipeItem.name, SwipeItem);
// Vue.component(Toast.name, Toast);
// Vue.component(Button.name, Button);
// Vue.use(Lazyload);
import MintUI from 'mint-ui'
import 'mint-ui/lib/style.css'
Vue.use(MintUI)
//注册全局的过滤器
Vue.filter("dateFmt",function(str,pattern="YYYY-MM-DD HH:mm:ss"){
    return moment(str).format(pattern);

});
//图片缩略图
import VuePreview from 'vue-preview'
Vue.use(VuePreview)
new Vue({
    el:"#app",
    data:{
        msg:'hello world'
    },
    render:c => c(app),
    router
   
});